load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("scm_client_infra")

rust_library(
    name = "edenfs-utils",
    srcs = glob(["src/**/*.rs"]),
    env = {
        "TEST_DATA": "$(location //eden/facebook/test-data:normalized-hostname)",
    },
    os_deps = [
        (
            "macos",
            [
                "fbsource//third-party/rust:nix",
            ],
        ),
        (
            "linux",
            [
                "fbsource//third-party/rust:nix",
            ],
        ),
        (
            "windows",
            [
                "fbsource//third-party/rust:winapi",
            ],
        ),
    ],
    test_deps = [
        "fbsource//third-party/rust:csv",
        "fbsource//third-party/rust:lazy_static",
    ],
    test_os_deps = [
        (
            "windows",
            [
                "fbsource//third-party/rust:quickcheck",
                "fbsource//third-party/rust:quickcheck_macros",
            ],
        ),
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:byteorder",
        "fbsource//third-party/rust:regex",
        "fbsource//third-party/rust:sysinfo",
        "fbsource//third-party/rust:tracing",
        "//eden/fs/cli_rs/edenfs-error:edenfs-error",
    ],
)
